home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / share / perl5 / Dpkg / Gettext.pm
Text File  |  2008-09-03  |  488b  |  39 lines

  1. #!/usr/bin/perl -w
  2. # Copied from /usr/share/perl5/Debconf/Gettext.pm
  3.  
  4. package Dpkg::Gettext;
  5.  
  6. use strict;
  7. use warnings;
  8.  
  9. BEGIN {
  10.     eval 'use Locale::gettext';
  11.     if ($@) {
  12.         eval q{
  13.             sub _g {
  14.                 return shift;
  15.             }
  16.             sub textdomain {
  17.             }
  18.             sub ngettext {
  19.                 if ($_[2] == 1) {
  20.                     return $_[0];
  21.                 } else {
  22.                     return $_[1];
  23.                 }
  24.             }
  25.         };
  26.     } else {
  27.         eval q{
  28.             sub _g {
  29.                 return gettext(shift);
  30.             }
  31.         };
  32.     }
  33. }
  34.  
  35. use base qw(Exporter);
  36. our @EXPORT=qw(_g textdomain ngettext);
  37.  
  38. 1;
  39.